package com.learn.apis;

import com.learn.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author DJJ_F
 * @version 1.0
 * @date 2025/08/08
 * @description ch12 sentinel
 * 配置统一的服务降级处理，就是调用服务的时候发生异常，而不是违反限流规则
 */
@FeignClient(value = "nacos-payment-provider", fallback = PayFeignSentinelApiFallBack.class)
public interface PayFeignSentinelApi {

    /**
     * sentinel 整合 openfeign
     * @param id
     * @return
     */
    @GetMapping("/pay/get/sentinel/{id}")
    Result<String> getSentinel(@PathVariable("id") Integer id);
}
